<?php
/**
 * (actions)
 */
namespace App\Admin\Actions\CustomerDelivery;

use Encore\Admin\Grid\Tools\AbstractTool;
use Illuminate\Support\Facades\Request;
class ExportLogistics extends AbstractTool
{
    protected $urlStr;

    public function __construct($urlStr)
    {
        $this->urlStr = $urlStr;
    }

    public function render()
    {
        $downloadUrl = '/xqc/' . $this->urlStr . '?' . http_build_query(Request::all());
        return <<<EOT
<div class="btn-group">
    <a class="btn btn-sm btn-warning" href="{$downloadUrl}" target="_blank"><i class="fa fa-download"></i> 物流信息-乐天</a>
</div>
EOT;
    }
}
